//
//  WebVc.m
//  HoldTheDoll
//
//  Created by 了赢 on 2018/6/4.
//  Copyright © 2018年 liaoying. All rights reserved.
//

#import "WebVc.h"

@interface WebVc ()

@property (nonatomic,strong)UIWebView *webView;

@end

@implementation WebVc

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"详情";
    
    self.webView= [[UIWebView alloc] init];
    
    [self.view addSubview:self.webView];
    
    [self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.mas_equalTo(0);
    }];
    
    
    self.webView.scalesPageToFit = YES;
    
    
    if(![LYTools stringIsNil:self.webUrl])
    {
        
        if(![LYTools isHaveString:self.webUrl withHaveStr:@"http"])
        {
             [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@",self.webUrl]]]];
        }
        else
        {
             [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.webUrl]]];
        }
   
    }
    else if (![LYTools stringIsNil:self.remark])
    {
        
        [self.webView loadHTMLString:[LYTools changeHtmlContentSize:self.remark] baseURL:nil];
        
    }

    
}



@end
